#include "HaffmanAlgorithm.h"
#include "TextReader.h"
#include "TextWriter.h"
#include "FrequencyBuilder.h"
#include "TreeFactory.h"
#include "CodeTableFactory.h"
#include "CodeTable.h"
#include "TreeWriter.h"

class HaffmanEncoder: public HaffmanAlgorithm
{
private:
        void encode(ICodeTable* table, IDataReader* reader, IDataWriter* writer);
		void engine(IDataReader* reader, IDataWriter* writer, IFrequencyBuilder* frequencyBuilder, ITreeFactory* treeFactory, ICodeTableFactory* tableFactory, ITreeWriter* treeWriter);
public:
	virtual void start(char* input, char* output);
};